home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / virus / avl1094 / unpacklib / programmers_docs / unpacklib_docs next >
Text File  |  1995-03-09  |  28KB  |  802 lines

  1. ***************************************************************************
  2. *                        UNPACK.LIBRARY V37.32 DOC                        *
  3. *                                                                         *
  4. *                                                                         *
  5. *                             Update 14-11-93                             *
  6. *                                                                         *
  7. *                                                                         *
  8. *                          SAFE HEX INTERNATIONAL                         *
  9. ***************************************************************************
  10.  
  11.  
  12. Welcome  to  the release version of this library. I hope it's a library you
  13. can  use  in your virus killer or whatever you are doing. One of the things
  14. this library can do, is to help a viruskiller programmer to scan files that
  15. are crunched.
  16.  
  17.  
  18.      o  This  library  is  copyrighted  by  SHI  and  may  NOT  be  used in
  19.         commercial programs without a written permission from SHI.
  20.  
  21.      o  SHI  members can of course use this library for free. (But remember
  22.         to get a written permission.
  23.  
  24.      o  All  Shareware programmers can be SHI members, if they full-fill to
  25.         support our anti-virus work. (But remember to send your address and
  26.         program idea to SHI, to get a written permission).
  27.  
  28.  
  29. It's  forbidden  to  reassemble  (reverse engining) in any way this library
  30. code.  All the ideas to the way we unpacks files are copyrighted by SHI. If
  31. you  don't  respect  our  copyright - or, if you use this library without a
  32. written permission, SHI will contact the police to stop you.
  33.  
  34. Please  add  the  "WantedHelp"  (a  list  containing  wanted  crunchers for
  35. update), and remember to credit the author (Thomas Neumann) and SHI in your
  36. program as stated in the following:
  37.  
  38. ---------------------------------------------------------------------------
  39.  
  40. ABOUT SAFE HEX INTERNATIONAL
  41. If you know a virus programmer you can get a reward of $ 1000 for supplying
  42. his  name  and  address.  The fact is that the law punishes data crime very
  43. severely. (5 years in jail in most countries).
  44.  
  45. We  are  an international group with more than 500 members who have started
  46. trying to stop the spread of virus. Let me give you some example:
  47.  
  48.         1. Our motto is: "Safe Hex", who dares do anything else today?".
  49.         2. A virus bank containing more than 1800 Amiga and PC viruses for
  50.            supporting good shareware antivirus programs.
  51.         3. We help people to get money back lost by virus infection.
  52.         4. We write articles about virus problems for about 20 computer
  53.            magazines worldwide.
  54.         5. We release the newest and the best virus killers around from
  55.            about 25 wellknown programmers worldwide.
  56.         6. We have more than 35 PC and Amiga "Virus Centers" worldwide
  57.            where you can get free virus help by phoning our "Hotline", and
  58.            the newest killers translated in your own language at very
  59.            little cost.
  60.  
  61. For more information contact:
  62.  
  63.         SAFE HEX INTERNATIONAL            (Please send 2 "Coupon-Response
  64.         Erik Loevendahl Soerensen         International" and a self addres-
  65.         Snaphanevej 10                    sed envelope, if you want infor-
  66.         DK-4720 Praestoe                  mation about SHI by letter).
  67.         Denmark                             
  68.         Phone: + 45 55 99 25 12
  69.         Fax  : + 45 55 99 34 98
  70.  
  71. ---------------------------------------------------------------------------
  72.  
  73. ***************************************************************************
  74. *                            Table of contents                            *
  75. ***************************************************************************
  76.  
  77. unpack.library/AllocCInfo()
  78. unpack.library/DetermineFile()
  79. unpack.library/FreeCInfo()
  80. unpack.library/FreeFile()
  81. unpack.library/LoadFile()
  82. unpack.library/NewUnpackNum()
  83. unpack.library/SendCmd()
  84. unpack.library/TestHunk()
  85. unpack.library/Unpack()
  86. unpack.library/UnpackList()
  87. unpack.library/UnpackListNext()
  88. unpack.library/UnuseDrive()
  89. unpack.library/UseDrive()
  90.  
  91. ---------------------------------------------------------------------------
  92.  
  93. ***************************************************************************
  94. *                    Offsets and functions destiptions                    *
  95. ***************************************************************************
  96.  
  97.  
  98. AllocCInfo(34.0)                                           AllocCInfo(34.0)
  99.  
  100.  
  101. NAME
  102.         AllocCInfo - allocates an info structure.
  103.  
  104. SYNOPSIS
  105.         info = AllocCInfo ()
  106.          D0       -30
  107.  
  108.         APTR AllocCInfo(VOID);
  109.  
  110. FUNCTION
  111.         AllocCInfo()  allocates  an info structure the library uses when it
  112.         unpacks files. You just have to call this function in the beginning
  113.         of your program and then free it again with FreeCInfo() at the end.
  114.         I  have  made  this  function,  because  in future versions of this
  115.         library,  the  structure  will be bigger. Your program will then be
  116.         compatible for any future versions of this library.
  117.  
  118. INPUTS
  119.         None.
  120.  
  121. OUTPUTS
  122.         info  -  is a pointer to the allocated info structure. If there has
  123.                  occured an error, a zero is returned.
  124.  
  125. STRUCTURE
  126.         This is how the Info Structure is build:
  127.  
  128.         STRUCTURE UnpackInfo,0
  129.         APTR    UI_Filename
  130.         APTR    UI_Path
  131.         APTR    UI_Jump
  132.         APTR    UI_CruncherName
  133.         APTR    UI_DecrunchAdr
  134.         LONG    UI_DecrunchLen
  135.         UWORD   UI_ErrorNum
  136.         UWORD   UI_CrunchNum
  137.         UBYTE   UI_CrunchType
  138.         UBYTE   UI_Flag
  139.         APTR    UI_LoadNamePoi
  140.         LONG    UI_CrunchLen
  141.         APTR    UI_UserData             ;V35+
  142.         APTR    UI_TrackJump            ;V36+
  143.         APTR    UI_TrkErrJump           ;V36+
  144.         LONG    UI_Offset               ;V36+
  145.         UWORD   UI_Track                ;V36+
  146.         APTR    UI_ErrorMsg             ;V37+
  147.         APTR    UI_CrunchAdr            ;V37+
  148.  
  149. ; This Is Private, Do NOT Touch
  150.  
  151.         LONG    UI_CrunchLenTemp
  152.         LONG    UI_FileHandler
  153.         LONG    UI_Lock
  154.         LONG    UI_OldLock
  155.         APTR    UI_InfoAdr
  156.         APTR    UI_UnpackPoi
  157.         ULONG   UI_Temp
  158.         STRUCT  UI_Data,4*4              ;V35+
  159.         STRUCT  UI_LoadName,128
  160.         STRUCT  UI_ExecuteString,256
  161.         LABEL   UnpackInfo_SIZEOF
  162.  
  163.  
  164.         NOTE:
  165.         -----
  166.  
  167.         The private area is a bad idea to use, because the different fields
  168.         will maybe be moved around in future versions.
  169.  
  170.  
  171.         UI_Filename     is a pointer to the filename you want to scan.
  172.  
  173.         UI_Path         is  a  pointer  to a zero-terminated path where the
  174.                         library have to unpack archive files, such as a LHA
  175.                         archive. Please select a path where you haven't got
  176.                         some  important  data,  because  ALL  files will be
  177.                         deleted in the path if the DELETE flag is on.
  178.  
  179.         UI_Jump         This  is  a  pointer  to your scan routine. If this
  180.                         pointer are zero, no jump will be made.
  181.  
  182.         UI_CruncherName This is a pointer to the crunchers name the file is
  183.                         crunched with. The name are zero-terminated.
  184.  
  185.         UI_DecrunchAdr  This  is  the start address of the decrunched file.
  186.                         Your  scan routine just have to read this field and
  187.                         the UI_DecrunchLen field and scan that memory.
  188.  
  189.         UI_DecrunchLen  This is the length of the decrunched file.
  190.  
  191.         UI_ErrorNum     If  an  error  occur, the error number is stored in
  192.                         this   field.   See  the  unpack.i  file  for  more
  193.                         information.
  194.  
  195.         UI_CrunchNum    Here  is  the cruncher number stored. Each cruncher
  196.                         has  a  number  so  you can find out which cruncher
  197.                         there are used on the file.
  198.  
  199.         UI_CrunchType   Here   is  a  number  that  tells  about  the  file
  200.                         (archive, data or object file).
  201.  
  202.         UI_Flag         You  can  select  some different things the library
  203.                         has  to  do  when  it tests the file. See below for
  204.                         more info.
  205.  
  206.         UI_LoadNamePoi  This  is  just  a pointer to the UI_LoadName field.
  207.                         Use  this if you want to use the UI_LoadName field,
  208.                         because the field will be moved in future versions.
  209.  
  210.         UI_LoadName     Here  is  the filename stored, the library is about
  211.                         to decrunch, if the file is an archive.
  212.  
  213.         UI_CrunchLen    This is the length of the crunched file.
  214.  
  215.         UI_UserData     This  value  will be stored in A1 when the Unpack()
  216.                         function jump through the UI_Jump field. (V35+)
  217.  
  218.         UI_TrackJump    This field have the same function as UI_Jump, exept
  219.                         that  the library will only jump through this field
  220.                         when its unpack a track crunched file, such as DMS.
  221.                         The  library  will jump for every track it unpacks.
  222.                         You  have  to  return a return value in D0. You can
  223.                         select  between  these  values: 0 means every thing
  224.                         are   okay,   just   continue  and  -1  means  stop
  225.                         unpacking.  If this field are zero, no jump will be
  226.                         made (V36+).
  227.  
  228.         UI_TrkErrJump   The  library  will  jump through this pointer if an
  229.                         error  occurs.  There  are a lot of errors, such as
  230.                         checksum  error  etc.  You  routine  can  read  the
  231.                         UI_ErrorNum field in the info structure to see what
  232.                         went  wrong.  In  D0  you  have  to return the same
  233.                         values as in UI_TrackJump (V36+).
  234.  
  235.         UI_Offset       Here  will  be  stored the offset on a disk, ex. if
  236.                         the library just have unpacked track 40, there will
  237.                         be  stored  in this field: 40*22*512. You tracksave
  238.                         routine can read this field, UI_DecrunchAdr and the
  239.                         UI_DecrunchLen  fields  and just call the SendCmd()
  240.                         function with these values as parameters (V36+).
  241.  
  242.         UI_Track        Here  are  stored  the  track the library just have
  243.                         unpacked (V36+).
  244.  
  245.         UI_ErrorMsg     If  an error occurs, a pointer to the error message
  246.                         will be stored here (V37+).
  247.  
  248.         UI_CrunchAdr    This  is a pointer to the crunched data. If you use
  249.                         the  NoLoad  flag,  you  have  to  store  the start
  250.                         address and the length of the crunched data in this
  251.                         field and the UI_CrunchLen field (V37+).
  252.  
  253.  
  254. The flag have the following functions:
  255.  
  256.  
  257. Name         Bit             Function
  258. ---------------------------------------------------------------------------
  259. UFB_OneFile  0          Select  to  unpack  one file at a time or the whole
  260.                         archive. If set, one file is selected.
  261.  
  262. UFB_Delete   1          Delete  files  after scanning. Set = Delete. If you
  263.                         set  this bit on, ALL files AND directories will be
  264.                         deleted,  not  only  the files there were stored in
  265.                         the archive.
  266.  
  267. UFB_NoFree   2          If this bit is set, the decrunched file will NOT be
  268.                         freed  from memory after the Unpack() function have
  269.                         called through the UI_Jump pointer. If you set this
  270.                         bit,  you  have to free the memory by yourself with
  271.                         the FreeFile() function. (V35+)
  272.  
  273. UFB_Banner   3          This  bit are the give banner bit. If set, you will
  274.                         get  the banner text in UI_DecrunchAdr. You routine
  275.                         the  UI_TrackJump  pointer  points to, have to test
  276.                         the  UI_Offset field to see it's a banner or normal
  277.                         track there are given. If the UI_Offset are -1, its
  278.                         a banner. (V36+)
  279.  
  280. UFB_NoLoad   4          If  this  bit  are  set,  the  DetermineFile()  and
  281.                         Unpack()  functions  will  not  load  the file into
  282.                         memory,  but  use the UI_CrunchAdr and UI_CrunchLen
  283.                         field  in  the  Unpack  Info  structure  to get the
  284.                         crunched data (V37+).
  285.  
  286.              5-7        Reserved
  287.  
  288. BUGS
  289.         None known.
  290.  
  291. SEE ALSO
  292.         FreeCInfo()
  293.  
  294. ---------------------------------------------------------------------------
  295.  
  296. DetermineFile(34.0)                                     DetermineFile(34.0)
  297.  
  298.  
  299. NAME
  300.         DetermineFile - scans  a  file  to find out which cruncher that are
  301.                         used.
  302.  
  303. SYNOPSIS
  304.         success = DetermineFile (info, filename)
  305.           D0          -42         A0      A1
  306.  
  307.         BOOL DetermineFile (APTR, char *);
  308.  
  309. FUNCTION
  310.         DetermineFile()  scans  a  file to find out which cruncher the file
  311.         are  crunched with. If the library can't find out, an error message
  312.         is  returned.  You  have  to  call  this  function  first, then the
  313.         Unpack() function, if no error has occured.
  314.  
  315. INPUTS
  316.         info     - is  the  memory  address  you  got from the AllocCInfo()
  317.                    function.
  318.  
  319.         filename - is  a  pointer  to  the  filename  you want to scan. The
  320.                    filename has to be zero-terminated.
  321.  
  322. OUTPUTS
  323.         success  - is an indicator that tells about the operation. If every
  324.                    thing is okay, a non-zero value is returned, else a zero
  325.                    will  be  returned. If you get an error, you can look at
  326.                    the  UI_ErrorNum  flag in the info structure to see what
  327.                    went wrong.
  328.  
  329. BUGS
  330.         None known.
  331.  
  332. SEE ALSO
  333.         Unpack()
  334.  
  335. ---------------------------------------------------------------------------
  336.  
  337. FreeCInfo(34.0)                                             FreeCInfo(34.0)
  338.  
  339.  
  340. NAME
  341.         FreeCInfo - frees the info structure again.
  342.  
  343. SYNOPSIS
  344.         FreeCInfo (info)
  345.            -36      A0
  346.  
  347.         void FreeCInfo (APTR);
  348.  
  349. FUNCTION
  350.         FreeCInfo()  frees  the info structure again. You have to call this
  351.         function at the end of your program.
  352.  
  353. INPUTS
  354.         info  - is  the  memory  address  you  got  from  the  AllocCInfo()
  355.                 function.  If the memory address is zero, you will NOT take
  356.                 a  trip  to  India  (and visit the GURU) when you call this
  357.                 function.
  358.  
  359. OUTPUTS
  360.         None.
  361.  
  362. BUGS
  363.         None known.
  364.  
  365. SEE ALSO
  366.         AllocCInfo()
  367.  
  368. ---------------------------------------------------------------------------
  369.  
  370. FreeFile(34.20)                                             FreeFile(34.20)
  371.  
  372.  
  373. NAME
  374.         FreeFile - frees a file from memory.
  375.  
  376. SYNOPSIS
  377.         FreeFile (info)
  378.           -84      A0
  379.  
  380.         void FreeFile (APTR);
  381.  
  382. FUNCTION
  383.         You have to call this function after you have called the LoadFile()
  384.         function  and  are  finished with the file. This function frees the
  385.         memory again.
  386.  
  387.         NOTE:  You MUST call this function instead of freeing the memory by
  388.         yourself!!
  389.  
  390. INPUTS
  391.         info - is   the  memory  address  you  got  from  the  AllocCInfo()
  392.                function.  You  can  call  always this function, even if the
  393.                LoadFile() function returned an error.
  394.  
  395. OUTPUTS
  396.         None.
  397.  
  398. BUGS
  399.         None known.
  400.  
  401. SEE ALSO
  402.         LoadFile()
  403.  
  404. ---------------------------------------------------------------------------
  405.  
  406. LoadFile(34.20)                                             LoadFile(34.20)
  407.  
  408.  
  409. NAME
  410.         LoadFile - loads a file into memory.
  411.  
  412. SYNOPSIS
  413.         success = LoadFile (info)
  414.           D0        -78      A0
  415.  
  416.         BOOL LoadFile (APTR);
  417.  
  418. FUNCTION
  419.         This  function allocate some memory with the files length and loads
  420.         the file into it. The filename are taken from the UI_Filename field
  421.         in  the  info  structure.  The  length  and address of the file are
  422.         stored in UI_DecrunchLen and UI_DecrunchAdr.
  423.  
  424.         V36.30:
  425.         -------
  426.  
  427.         If  the library runs under KS 37+, all caches will be cleared after
  428.         the file are loaded into the memory.
  429.  
  430. INPUTS
  431.         info    - is  the  memory  address  you  got  from the AllocCInfo()
  432.                   function.
  433.  
  434. OUTPUTS
  435.         success - is  an indicator that tells about the operation. If every
  436.                   thing  is  okay, the file length is returned, else a zero
  437.                   will  be returned and the allocated memory will be freed.
  438.                   If you get an error, you can look at the UI_ErrorNum flag
  439.                   in the info structure to see what went wrong.
  440.  
  441. BUGS
  442.         None known.
  443.  
  444. SEE ALSO
  445.         FreeFile()
  446.  
  447. ---------------------------------------------------------------------------
  448.  
  449. NewUnpackNum(37.32)                                     NewUnpackNum(37.32)
  450.  
  451.  
  452. NAME
  453.         NewUnpackNum - gives the number of unpackers in a structure.
  454.  
  455. SYNOPSIS
  456.         number = NewUnpackNum ()
  457.           A0        -108
  458.  
  459.         APTR NewUnpackNum (void);
  460.  
  461. FUNCTION
  462.         NewUnpackNum()  counts  the  number  of  unpackers  the library can
  463.         determine  and  unpack.  You  will  get  two  different  numbers of
  464.         unpackers. The first one (types) are the numbers of different types
  465.         the  library  can  unpack,  example  PowerPacker  Data, PowerPacker
  466.         Library etc. The second one (unpackers) is the number of unpackers,
  467.         example PowerPacker, Lha, Imploder etc.
  468.  
  469. INPUTS
  470.         None.
  471.  
  472. OUTPUTS
  473.         number - a pointer to a structure that look like this:
  474.  
  475.                 STRUCTURE NumberStruct,0
  476.                 UWORD   NS_Version      ;Library Version
  477.                 UWORD   NS_Revision     ;Library Revision
  478.                 UWORD   NS_Types
  479.                 UWORD   NS_Unpackers
  480.                 LABEL   NumberStruct_SIZEOF
  481.  
  482. BUGS
  483.         None known.
  484.  
  485. ---------------------------------------------------------------------------
  486.  
  487. SendCmd(36.30)                                               SendCmd(36.30)
  488.  
  489.  
  490. NAME
  491.         SendCmd - sends a command to a devive.
  492.  
  493. SYNOPSIS
  494.         error = SendCmd (dinfo, address, offset, length, cmd)
  495.          D0      -102     A0      A1       D1      D2    D0
  496.  
  497.         UBYTE SendCmd (APTR, APTR, ULONG, ULONG, UBYTE);
  498.  
  499. FUNCTION
  500.         The  only  thing  this  function does, is send the command with the
  501.         parameters  to  the  device  opened by the UseDrive() function. The
  502.         command will be sent by the DoIO() function.
  503.  
  504. INPUTS
  505.         dinfo   - is a pointer returned by the UseDrive() function.
  506.  
  507.         address - is a pointer to the data area.
  508.  
  509.         offset  - is the offset on the disk.
  510.  
  511.         length  - is the number of bytes to send.
  512.  
  513.         cmd     - is the command to send, like a read, write or update.
  514.  
  515. OUTPUTS
  516.         error   - is the error number returned by the device.
  517.  
  518. BUGS
  519.         None known.
  520.  
  521. SEE ALSO
  522.         UseDrive(), UnuseDrive()
  523.  
  524. ---------------------------------------------------------------------------
  525.  
  526. TestHunk(34.1)                                               TestHunk(34.1)
  527.  
  528.  
  529. NAME
  530.         TestHunk - tests the hunk structure in a file.
  531.  
  532. SYNOPSIS
  533.         success = TestHunk (address)
  534.           D0        -54       A0
  535.  
  536.         BOOL TestHunk (APTR);
  537.  
  538. FUNCTION
  539.         TestHunk()  tests  a  file  for  the hunk structure. You have to be
  540.         sure,  that  the file you want to test is an object file, else this
  541.         routine  will  return  an  error. You can check this by look in the
  542.         UI_CrunchType  flag  in  the info structure. You don't need to call
  543.         this function by yourself before you calling the Unpack() function,
  544.         because  the  Unpack()  function does that by itself. I'm not quite
  545.         sure  it  handles  the overlay hunk correctly, but it should handle
  546.         it.  If  you  find  a file you know are okay and this function says
  547.         it's defect, please send me the file so I can find the error.
  548.  
  549. INPUTS
  550.         address - is the start address of the file you want to test.
  551.  
  552. OUTPUTS
  553.         success  - is an indicator that tells about the operation. If every
  554.                    thing is okay, a non-zero value is returned, else a zero
  555.                    will be returned.
  556.  
  557. BUGS
  558.         None known.
  559.  
  560. ---------------------------------------------------------------------------
  561.  
  562. Unpack(34.0)                                                   Unpack(34.0)
  563.  
  564.  
  565. NAME
  566.         Unpack - unpacks the file.
  567.  
  568. SYNOPSIS
  569.         success = Unpack (info)
  570.           D0       -48     A0
  571.  
  572.         BOOL Unpack (APTR);
  573.  
  574. FUNCTION
  575.         Unpack()  loads  the file into memory and unpacks it. When the file
  576.         is  unpacked,  the library will jump through the UI_Jump pointer to
  577.         your scan routine. If the UI_Jump contains a zero, the library will
  578.         not  jump.  All  what  your  scan  routine has to do, is to get the
  579.         UI_DecrunchAdr  and UI_DecrunchLen from the info structure and scan
  580.         that memory. If the file is an archive (Lha, zoo), the library will
  581.         unpack  the  archive  and  then read one file at a time and jump to
  582.         your scan routine.
  583.         If  you  need  a password to unpack a file, the library will open a
  584.         little  window  where  it asks for the password. The window will be
  585.         opened  on  the active screen, so if you open a screen by yourself,
  586.         the window will appear on it (if it's active).
  587.  
  588.         NOTE:
  589.         -----
  590.  
  591.         After  an  archive  is  unpacked  and  scanned,  all  the files and
  592.         directories  in  the  path you have selected will be deleted if the
  593.         DELETE  flag  is  on,  not  just the files there were stored in the
  594.         archive,  but  ALL  files will be deleted, so be sure to use a temp
  595.         directory or something like that.
  596.  
  597.         V35.22:
  598.         -------
  599.  
  600.         When this function jumps through the UI_Jump pointer, the following
  601.         registers will have these pointers:
  602.  
  603.         A0 = The start address of your routine (Unpack() makes a jsr (a0)).
  604.         A1 = Your pointer stored in the UI_UserData field.
  605.         A4 = The start address of the info structure.
  606.  
  607.         V36.30:
  608.         -------
  609.  
  610.         If the library runs under KS V37+, all caches will be cleared after
  611.         the decrunching.
  612.  
  613.         Track Crunched Files:
  614.         ---------------------
  615.  
  616.         This  function  will  jump  through UI_TrackJump instead of UI_Jump
  617.         when  it  unpacks  a  track crunched file. Such files are ex. a DMS
  618.         file.  The  routine have to return a value in D0. The values can be
  619.         0 to indicate that every things are ok and -1 to stop unpacking.
  620.  
  621. INPUTS
  622.         info     - is  the  memory  address  you  got from the AllocCInfo()
  623.                    function.
  624.  
  625. OUTPUTS
  626.         success  - is an indicator that tells about the operation. If every
  627.                    thing is okay, a non-zero value is returned, else a zero
  628.                    will  be  returned. If you get an error, you can look at
  629.                    the  UI_ErrorNum  flag in the info structure to see what
  630.                    went wrong.
  631.  
  632. BUGS
  633.         The  DMS Deep decruncher will not work correctly. I try to fix this
  634.         bug as soon as possible.
  635.  
  636. SEE ALSO
  637.         DetermineFile(), AllocCInfo()
  638.  
  639. ---------------------------------------------------------------------------
  640.  
  641. UnpackList(34.1)                                           UnpackList(34.1)
  642.  
  643.  
  644. NAME
  645.         UnpackList - makes an unpacker name list.
  646.  
  647. SYNOPSIS
  648.         name = UnpackList (info)
  649.          A1       -66       A0
  650.  
  651.         char * UnpackList (APTR);
  652.  
  653. FUNCTION
  654.         UnpackList()  gives  a  pointer  to  the first name to a packer the
  655.         library  can  determine & unpack. You can use this function, if you
  656.         want  to  make  a  list  over  all  the  unpackers  the library can
  657.         determine. Call this function first and then use UnpackListNext().
  658.  
  659. INPUTS
  660.         info - is   the  memory  address  you  got  from  the  AllocCInfo()
  661.                function.
  662.  
  663. OUTPUTS
  664.         name - is  a  pointer  to  a null-terminated string where the first
  665.                name are stored.
  666.  
  667. BUGS
  668.         None known.
  669.  
  670. SEE ALSO
  671.         UnpackListNext()
  672.  
  673. ---------------------------------------------------------------------------
  674.  
  675. UnpackListNext(34.1)                                   UnpackListNext(34.1)
  676.  
  677.  
  678. NAME
  679.         UnpackListNext - reads the next name in the unpacker list.
  680.  
  681. SYNOPSIS
  682.         success,name = UnpackListNext (info)
  683.           D0     A1         -72         A0
  684.  
  685.         APTR UnpackListNext (APTR);
  686.  
  687. FUNCTION
  688.         UnpackListNext()  gives  a pointer to the next name to a packer the
  689.         library  can  determine & unpack. You can use this function, if you
  690.         want  to  make  a  list  over  all  the  unpackers  the library can
  691.         determine.  Call  the UnpackList() function first and then use this
  692.         function.
  693.  
  694. INPUTS
  695.         info    - is  the  memory  address  you  got  from the AllocCInfo()
  696.                   function.
  697.  
  698. OUTPUTS
  699.         name    - is  a  pointer to a null-terminated string where the next
  700.                   name are stored.
  701.  
  702.                   V37.22
  703.                   ------
  704.  
  705.                   This  pointer will also be zero when the success flag are
  706.                   zero. This are only for C-programmers.
  707.  
  708.         success - if  this  contains a zero, there are no more crunchers in
  709.                   the list. Otherwise it will contain a non-zero value.
  710.  
  711. BUGS
  712.         None known.
  713.  
  714. SEE ALSO
  715.         UnpackList()
  716.  
  717. ---------------------------------------------------------------------------
  718.  
  719. UnuseDrive(36.30)                                         UnuseDrive(36.30)
  720.  
  721.  
  722. NAME
  723.         UnuseDrive - give back the drive to DOS.
  724.  
  725. SYNOPSIS
  726.         UnuseDrive (dinfo)
  727.            -96       A0
  728.  
  729.         void UnuseDrive (APTR);
  730.  
  731. FUNCTION
  732.         This function closes the device again and make the drive unbusy.
  733.  
  734. INPUTS
  735.         dinfo - is the pointer returned by the UseDrive() function.
  736.  
  737. OUTPUTS
  738.         Nothing.
  739.  
  740. BUGS
  741.         None known.
  742.  
  743. SEE ALSO
  744.         UseDrive(), SendCmd()
  745.  
  746. ---------------------------------------------------------------------------
  747.  
  748. UseDrive(36.30)                                             UseDrive(36.30)
  749.  
  750.  
  751. NAME
  752.         UseDrive - make a drive busy and ready for use.
  753.  
  754. SYNOPSIS
  755.         dinfo = UseDrive (info, drive)
  756.          D0       -90      A0     A1
  757.  
  758.         APTR UseDrive (APTR, char *);
  759.  
  760. FUNCTION
  761.         This  function  find out which device the drive given uses and open
  762.         it. Then it will make the drive busy, that means CLI/WorkBench will
  763.         not  be  able  to  use that drive until you unuse it. It's only you
  764.         that  can use it. This function are only made to give you a help to
  765.         write a track crunched-file saver.
  766.  
  767. INPUTS
  768.         info  - is  the  memory  address  you  got  from  the  AllocCInfo()
  769.                 function.
  770.  
  771.         drive - is a pointer to the drive you want to use, ex. DF0:, RAD:.
  772.  
  773. OUTPUTS
  774.         dinfo - is  a  pointer  to  a  structure  used  by the device. This
  775.                 structure  includes a IOStdReq structure and a message port
  776.                 structure.  If  you  get a zero back, and error occurs. You
  777.                 can see in the UI_ErrorNum field to see want went wrong.
  778.  
  779. BUGS
  780.         None known.
  781.  
  782. SEE ALSO
  783.         UnuseDrive(), SendCmd()
  784.  
  785. ---------------------------------------------------------------------------
  786.  
  787.         I  really  hope  you  can use this library. See also the Unpack.IFF
  788.         file to see how to construct your program.
  789.  
  790.         If  you  find any bugs in the library or if you have some crunchers
  791.         there  are  not  in  the  library,  please send a bug report or the
  792.         crunchers to me, thanks! See in the "WantedHelp" for more info!
  793.  
  794.  
  795.    WE NEED YOUR HELP TO GET THIS LIBRARY EVEN BETTER, THANK YOU VERY MUCH!
  796.  
  797.  
  798.         Thomas Neumann       Member of the SHI Anti Virus Group.
  799.         Kongensgade 78
  800.         3550 Slangerup
  801.         Denmark
  802.